import axios from "axios";
export default {
    async get(status) {
        //throw new Error("API demo error")
        // eslint-disable-next-line no-unreachable
        let url = status < 3 ? '/api/apply/researcher/?status=' + status : '/api/apply/researcher/';
        var res;
        await axios.get(url, {
            headers: {
                Authorization: 'Bearer ' + localStorage.getItem('access')
            }
        })
            .then(function (response){
                res = response.data;
            })
        return res;
    },

    async getClaim() {
        //throw new Error("API demo error")
        // eslint-disable-next-line no-unreachable
        let url = '/api/apply/claim/';
        var res;
        await axios.get(url, {
            headers: {
                Authorization: 'Bearer ' + localStorage.getItem('access')
            }
        })
            .then(function (response){
                res = response.data;
            })
        return res;
    },
}

